Optimizing stable in-place merging

نویسندگان

چکیده

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Ratio Based Stable In-Place Merging

We investigate the problem of stable in-place merging from a ratio k = n m based point of view where m, n are the sizes of the input sequences with m ≤ n . We introduce a novel algorithm for this problem that is asymptotically optimal regarding the number of assignments as well as comparisons. Our algorithm uses knowledge about the ratio of the input sizes to gain optimality and does not stay i...

متن کامل

Asymptotically Eecient In-place Merging ?

Two linear-time algorithms for in-place merging are presented. Both algorithms perform at most m(t+1)+n=2 t +o(m) comparisons, where m and n are the sizes of the input sequences, m n, and t = blog 2 (n=m)c. The rst algorithm is for unstable merging and it carries out no more than 3(n+m)+o(m) element moves. The second algorithm is for stable merging and it accomplishes at most 5n+12m+o(m) moves.

متن کامل

Multiway Blockwise In-place Merging

We present an algorithm for asymptotically efficient multiway blockwise in-place merging. Given an array A containing sorted subsequences A1, . . . , Ak of respective lengths n1, . . . , nk, where ∑k i=1 ni = n, we assume that extra k ·s elements (so called buffer elements) are positioned at the very end of array A, and that the lengths n1, . . . , nk are positive integer multiples of some para...

متن کامل

On Optimal and Efficient in Place Merging

We introduce a new stable in place merging algorithm that needs O(m log( n m +1)) comparisons and O(m+n) assignments. According to the lower bounds for merging our algorithm is asymptotically optimal regarding the number of comparisons as well as assignments. The stable algorithm is developed in a modular style out of an unstable kernel for which we give a definition in pseudocode. The literatu...

متن کامل

Optimal Stable Merging

This paper shows how to stably merge two sequences A and B of sizes m and n, m n, respectively, with O…m ‡ n† assignments, O…m log…n=m ‡ 1†† comparisons and using only a constant amount of additional space. This result matches all known lower bounds and closes an open problem posed by Dudzinski and Dydek in 1981. Our algorithm is based on the unstable algorithm of Mannila and Ukkonen. All techn...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Theoretical Computer Science

سال: 2003

ISSN: 0304-3975

DOI: 10.1016/s0304-3975(02)00775-2